<?php

namespace app\admin\controller\back;

use app\common\controller\Backend;
use think\Db;

/**
 * 回收商品管理
 *
 * @icon fa fa-circle-o
 */
class Backgood extends Backend
{

    /**
     * Backgood模型对象
     * @var \app\admin\model\back\Backgood
     */
    protected $model = null;

    public function _initialize()
    {
        parent::_initialize();
        $this->model = new \app\admin\model\back\Backgood;

    }


    /**
     * 添加
     *
     * @return string
     * @throws \think\Exception
     */
    public function add()
    {
        if (false === $this->request->isPost()) {
            return $this->view->fetch();
        }

        $params = $this->request->post('row/a');


        Db::name('backgood')->data($params)->insert();

        $this->success();
    }


}
